<?php

class mainComponents extends sfComponents
{
    public function executeTopnav()
    {
		$this->link = '';
		$user = $this->getUser();
		
		if ($this->getUser()->isAuthenticated())
		{
			$this->link = $user->getUserObject() . ' - ' .link_to('Logout', '@logout');
		}
		else
		{
			$this->link = link_to('Login', '@login');
		}
    }
}

?>
